import java.util.Random;

public class Cat extends Pet {
    String favoriteFood;

    public Cat() {
    }


    public Cat(String name, String type, int age, String coatColor, int hungerDegree, String favoriteFood) {
        super(name, type, age, coatColor, hungerDegree);
        this.favoriteFood = favoriteFood;
    }

    public void feed(){
        System.out.println(super.getName()+"吃了一个榴莲味的猫条");
    }
    public void change(){

        Random r = new Random();
        int randomNumber = r.nextInt(10)+1;
        System.out.println(super.getName()+"长胖了"+randomNumber+"斤");
    }

}
